<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/jquery-3.4.1.js"></script>
    <script src="../../js/map.js"></script>
    <script src="../../js/utils.js"></script>
<script>
$(document).ready(function(){
       /* $("p").click(function(){
            $(this).hide();
        });*/
     $("p").click(function () {
         testDate();
     });

    function testDate(){
        var date= new Date();
        var date2=date.Format("yyyy-MM-dd hh:mm:ss");
        console.log("date",date,"date2",date2);
        console.log("date2",date2);
    }
    function compareToday(thetime) {
        var   d=new   Date(Date.parse(thetime .replace(/-/g,"/")));
        var   curDate=new   Date();
        if(d <=curDate){
            return true;
        }
    }
    function validateDateRange(range_N) {
        var txnTimeStart = "";
        var txnTimeEnd ="";
        if(""!=txnTimeStart && ""!=txnTimeEnd){

            startParams = txnTimeStart.substring(0,10).split("-");
            endParams = txnTimeEnd.substring(0,10).split("-");
            var startDate = new Date(startParams[0], Number(startParams[1]) - 1 ,startParams[2]);
            var startDate_N = new Date(startParams[0], Number(startParams[1]) - 1, Number(startParams[2])+range_N);
            var endDate = new Date(endParams[0], Number(endParams[1]) - 1 ,endParams[2]);
            if(startDate>endDate){
                alert("开始时间大于结束时间！");
                return false;
            }
            if (startDate_N<endDate) {
                alert("时间跨度不能超过" + range_N + "天！");
                return false;
            }
            return true;
        }else{
            alert("时间不能为空！");
            return false;
        }
    }
});
</script>



</head>
<body>
    <p>1231231231。</p>
</body>
</html>